module.exports = (req, res) => {
    //登录拦截
    req.session.destroy(function() {
        //2、删除cookie
        res.clearCookie('connect.sid');
        //3、重定向回'/admin/login'
        res.redirect('/admin/login');
        req.app.locals.userInfo = null;
    });
}